﻿// Copyright 2007-2008 Rory Plaire (codekaizen@gmail.com)

using System;

namespace NPack.Interfaces
{
    /// <summary>
    /// Defines a type which can be compared with boolean comparison operations: &gt;, &gt;=, &lt;, or &lt;=.
    /// </summary>
    /// <typeparam name="T">Type on which boolean comparison is defined.</typeparam>
    public interface IBooleanComparable<T>
    {
        /// <summary>
        /// Returns true if the value called on is strictly greater than the <paramref name="value"/> given.
        /// </summary>
        /// <param name="value">The value to compare to.</param>
        /// <returns>True if the called on instance is greater, false if the <paramref name="value"/> is greater or equal.</returns>
        Boolean GreaterThan(T value);

        /// <summary>
        /// Returns true if the value called on is greater than or equal to the <paramref name="value"/> given.
        /// </summary>
        /// <param name="value">The value to compare to.</param>
        /// <returns>True if the called on instance is greater or equal, false if the <paramref name="value"/> is greater.</returns>
        Boolean GreaterThanOrEqualTo(T value);

        /// <summary>
        /// Returns true if the value called on is strictly less than the <paramref name="value"/> given.
        /// </summary>
        /// <param name="value">The value to compare to.</param>
        /// <returns>True if the called on instance is less, false if the <paramref name="value"/> is less or equal.</returns>
        Boolean LessThan(T value);

        /// <summary>
        /// Returns true if the value called on is less than or equal to the <paramref name="value"/> given.
        /// </summary>
        /// <param name="value">The value to compare to.</param>
        /// <returns>True if the called on instance is less or equal, false if the <paramref name="value"/> is less.</returns>
        Boolean LessThanOrEqualTo(T value);
    }
}
